10 '
50 CLEAR 2000
85 D$="$###,#.###":E$="$#######,#.##":G$="$#####,#.##":H$="######,#.##"
90 A1$="INITIAL BALANCE : $":A2$="NUMBER OF PAYMENTS PER YEAR :"
92 O1$="REGULAR PAYMENT":O2$="TOTAL OF PAYMENTS":O3$="TOTAL INTEREST PAID"
94 H1$="VALUE OF INVESTMENT":H2$="VALUE OF ACCUM. INTEREST":H3$="TOTAL VALUE"
95 DEFDBL Q,Y,X,W,P,D,O,J,K,R,C,S,L,H,I:DIM A(20)
100 CLS:PRINT TAB(10)"IBM PERSONAL COMPUTER HOME FINANCE PROGRAMS":PRINT :PRINT
110 PRINT:PRINT"LOAN AMORITIZATION CALCULATIONS";:PRINT TAB(50)"1"
120 PRINT:PRINT"LOAN AMORITIZATION SCHEDULE";:PRINT TAB(50)"2"
130 PRINT:PRINT"ANNUITIES CALCULATIONS";:PRINT TAB(50)"3"
140 PRINT:PRINT"HOME OWNER'S COST CALCULATIONS";:PRINT TAB(50)"4"
150 PRINT:PRINT"DEPRECIATIONS SCHEDULES";:PRINT TAB(50)"5"
160 PRINT:INPUT"WHICH PROGRAM :";X:IF X<1 OR X>5 THEN 100
180 ON X GOTO 2000,2600,3000,1000,4000
1000 CLS:PRINT TAB(14)"HOME OWNER'S REAL MONTHLY COST ESTIMATE"
1010 PRINT:INPUT"YOUR MONTHLY PAYMENT (WITH PROPERTY TAX) :$";A1
1025 X=A1*12:PRINT"ANNUALLY THIS AMOUNTS TO : $";X
1030 PRINT:INPUT"YOUR MORTGAGE IS : $";A2
1035 INPUT"YOUR ANNUAL INTEREST RATE IS : %";A3
1040 Q=(A3/100)*A2:GOSUB 2850:V=Q
1045 PRINT"FIRST YEAR'S INTEREST WILL BE : $";V
1050 PRINT:INPUT"ANNUAL PROPERTY TAXES ARE : $";A4
1055 D=V+A4:PRINT"DEDUCTIBLE INTEREST & TAXES TOTAL : $";D
1060 PRINT:INPUT"YOU ESTIMATE YOU ARE IN WHAT TAX BRACKET : %";A5
1065 A5=A5/100:Q=A5*D:F=Q
1070 PRINT"YOUR DEDUCTIONS WILL SAVE YOU : ";USINGG$;F
1075 INPUT"ESTIMATE YOUR PROPERTY VALUE INCREASE NEXT YEAR : %";A6:PRINT:PRINT:PRINT:PRINT
1080 A6=A6/100:Q=A6*A2:S=Q
1085 PRINT"YOUR PROPERTY WILL INCREASE IN VALUE : ";USINGG$;S
1090 M=ABS(X-D):PRINT"YOUR MORTAGE REDUCTION WILL AMOUNT TO : $";M
1095 N=F+S+M:PRINT"YOUR TOTAL BENEFITS NEXT YEAR WILL AMOUNT TO : $";N
1100 Q=N/12:O=Q:J=A1-O
1105 PRINT:PRINT"MONTHLY PAYMENT IS :";TAB(5) USING G$;A1
1110 PRINT"YOUR MONTHLY BENEFITS ARE :";TAB(35) USING G$;O
1115 PRINT"YOUR REAL MONTHLY COST IS :";TAB(35) USING G$;J
1120 PRINT:PRINT"THE ABOVE RESULTS ARE ESTIMATES ONLY"
1125 INPUT"PRESS ENTER TO RETURN TO MENU ";X$:GOTO 10
2000 CLS:PRINT TAB(15)"LOAN AMORITIZATION CALCULATION"
2010 PRINT:PRINT A1$;:INPUT A1
2015 GOSUB 5000:PRINT:PRINT A2$;:INPUT V
2020 A2=A2/V/100:X=1+A2:Y=V*A3/12:P=X^Y:B=1/P:C=A1*A2/(1-B):R=C*A3:K=R-A1
2060 PRINT STRING$(45,"=")
2065 PRINT O1$;TAB(35) USING E$;C
2070 PRINT O2$;TAB(35) USING E$;R
2075 PRINT O3$;TAB(35) USING E$;K
2080 PRINT:INPUT"CONTINUE (Y/N) ";C$:IF C$="Y" GOTO 2000 ELSE IF C$="N" GOTO 10
2083 GOTO 2080
2600 CLS:PRINT TAB(18)"LOAN AMORTIZATION SCHEDULE"
2615 PRINT:PRINT:I=0:R=0:H=0:S=0:X=0:A1=0:A4=0:A3=0
2620 INPUT"BEGINNING BALANCE : $";H:A(0)=H
2630 INPUT"ANNUAL INTEREST RATE : %";A1:L=(A1/12)/100
2640 INPUT"LOAN TERM (YRS,MONTHS) :";N,A6:N=N*12+A6
2645 INPUT"# OF MONTH OF FIRST PAYMENT :";A7:IF A7=0 THEN A7=1
2646 PRINT"ENTER 0 FOR COMPUTER CALCULATION OF PAYMENT"
2648 INPUT"MONTHLY PAYMENT :$";X:IF X>0 THEN 2665
2655 X=(1+L):Y=-N:P=X^Y:X=H*(L/(1-P)):X=(INT(100*X))/100
2665 GOSUB 2670:GOTO 2685
2670 CLS:PRINT"BAL";USING E$;A(0)
2673 PRINT"INTEREST %";A1
2675 PRINT"MONTHLY PAYMENT";USING G$;X
2680 PRINT"MONTH      PRINCIPLE      INTEREST   INT TO DATE    BALANCE"
2682 RETURN
2685 A3=A7:N=N+A7-1
2687 A9=0:A(10)=0:FOR Z=A3 TO A3+12-A7
2690 PRINT Z;
2695 I=H*L:I=(INT(100*I))/100:S=S+I:A4=X-I:H=H-A4
2703 R=R+A4:A9=A9+I:A(10)=A(10)+A4:IF Z=-1 THEN PRINT"LAST";
2704 PRINT TAB(8) USING G$;A4;:PRINT TAB(23) USING G$;I;:PRINT TAB(35) USING E$;S;:PRINT TAB(49) USING E$;H
2712 IF Z=-1 THEN 2720
2713 IF H<=X THEN I=(INT(100*H*L))/100:S=S+I:A4=H:Z=-1:H=0:GOTO 2703
2714 IF Z=N THEN Z=-1:GOTO 2720
2715 NEXT Z:A3=A3+13-A7:A7=1
2720 PRINT"TOTALS";:PRINT TAB(8) USING G$;A(10);:PRINT TAB(23) USING G$;A9;
2725 INPUT"    CONTINUE (Y/N)";C$:IF C$<>"Y" THEN 2800
2727 IF (C$="Y") AND (Z=-1) THEN 2800
2730 GOSUB 2670:GOTO 2687
2800 CLS:PRINT"TOTAL PRINCIPLE PAID ";USING E$;R
2810 PRINT"TOTAL INTEREST PAID  ";USING E$;S
2815 G=H*L/30
2818 PRINT
2820 IF H=0 THEN 2830
2823 PRINT"FINAL PAYMENT IS     ";USING E$;H
2824 PRINT"INTEREST PER DAY IS     ";USING D$;G
2830 INPUT"AGAIN ";C$:IF C$="Y" THEN 2600
2845 IF C$="N" THEN 10 ELSE 2830
2850 RETURN
3000 '
3001 CLS:PRINT TAB(18)"ANNUITIES CALCULATIONS"
3005 PRINT:PRINT:PRINT"FUTURE VALUE OF A SINGLE DEPOSIT";TAB(55)"1"
3010 PRINT:PRINT"PRESENT VALUE REQUIRED FOR A FUTURE VALUE";TAB(55)"2"
3015 PRINT:PRINT"FUTURE VALUE OF REGULAR DEPOSITS";TAB(55)"3"
3020 PRINT:PRINT"REGULAR DEPOSITS REQUIRED TO ACHIEVE A FUTURE VALUE";TAB(55)"4"
3030 PRINT:PRINT"EXIT THIS PROGRAM";TAB(55)"5"
3035 PRINT:INPUT"WHICH PROGRAM : ";X:IF X<1 OR X>5 THEN 3000
3050 ON X GOTO 3100,3200,3300,3400,10
3100 CLS:PRINT TAB(10)"FUTURE VALUE OF A DEPOSIT"
3105 INPUT"INITIAL INVESTMENT : $";A1
3110 GOSUB 5000
3115 PRINT:INPUT"NUMBER OF COMPOUNDING PERIODS/YR :";V
3120 A2=A2/V/100:X=1+A2:Y=(A3/12)*V:P=X^Y:Q=P*A1:W=Q-A1:GOSUB 5100
3130 GOSUB 9500:GOTO 3000
3200 CLS:PRINT TAB(12)"PRESENT VALUE REQUIRED FOR A FUTURE VALUE"
3210 INPUT"FUTURE VALUE EXPECTED : $";A1
3220 GOSUB 5000:PRINT:INPUT"NUMBER OF COMPOUNDING PERIODS/YR ; ";V
3225 A2=A2/V/100:X=1+A2:Y=-A3/12*V:P=X^Y
3230 Q=P*A1:W=A1-Q:D=A1:A1=Q:Q=D:PRINT:GOSUB5100
3235 GOTO 3130
3300 CLS:PRINT TAB(20)"FUTURE VALUE OF REGULAR DEPOSITS"
3310 INPUT"DEPOSIT : $";A1
3313 GOSUB 3315:GOTO 3320
3315 GOSUB 5000:PRINT:INPUT"NUMBER OF DEPOSITS PER YEAR : ";V
3317 PRINT:INPUT"NUMBER OF COMPOUNDING PERIODS PER YEAR : ";T:S=V/T
3319 RETURN
3320 A2=A2/T/100:X=1+A2:Y=A3/12*T:P=X^Y:Q=(A1*V/T)*((P-1)/A2):A1=A1*A3/12*V
3330 W=Q-A1:PRINT:GOSUB 5100:GOTO 3130
3400 CLS:PRINT TAB(5)"REGULAR DEPOSITS REQUIRED TO ACHIEVE A FUTURE VALUE"
3410 INPUT"FUTURE VALUE : $";A1:GOSUB 3315:A2=A2/T/100:X=1+A2:Y=A3/12*T:P=X^Y:Q=A1*(A2/(P-1)):Q=Q*T/V:C=Q*V*A3/12
3430 PRINT STRING$(50,"=")
3435 PRINT"REGULAR DEPOSIT REQUIRED"TAB(35) USING G$;Q
3440 W=A1-C:Q=A1:A1=C:GOSUB 5105:GOTO 3130
4000 CLS:PRINT TAB(25)"DEPRECIATION SCHEDULES"
4010 PRINT:PRINT"STRAIGHT LINE METHOD";TAB(50)"1"
4020 PRINT:PRINT"SUM OF THE YEARS DIGITS METHOD";TAB(50)"2"
4030 PRINT:PRINT"DECLINING BALANCE METHOD";TAB(50)"3"
4050 PRINT:INPUT"WHICH PROGRAM";X:IF X=4 THEN 100
4060 IF X<1 OR X>4 THEN 4000
4065 A(20)=X
4070 ON X GOTO 4100,4200,4300
4072 PRINT:PRINT"EXIT THE PROGRAM";TAB(50)"4"
4100 CLS:A$="STRAIGHT LINE":B$=" METHOD":PRINT TAB(23)A$;B$:PRINT:GOSUB 4900
4105 I=18:X=A3/A4:GOSUB 4500:GOSUB 4550:GOTO 4000
4200 CLS:A$="SUM OF THE YEARS":B$=" DIGITS METHOD"
4205 PRINT TAB(13)A$;B$:PRINT:GOSUB 4900
4210 E=0:FOR Z=1 TO A4:E=E+Z:NEXT
4220 I=18:GOSUB 4500:GOSUB 4550:GOTO 4000
4300 CLS:A$="DECLINING":B$=" BALANCE METHOD"
4307 PRINT TAB(22)A$;B$:I=22
4310 GOSUB 4950
4340 A3=A3/100/A4:GOSUB 4500:GOSUB 4550:GOTO 4000
4500 CLS:PRINT TAB(I)A$;B$:PRINT TAB(3)"YEARS";TAB(25)"DEPRECIATION";
4506 PRINT TAB(48)"DEPRECIATED":PRINT TAB(28)"VALUE";TAB(52)"VALUE"
4510 RETURN
4550 A7=0:V=0:U=A1
4555 FOR Z=A7 TO (A7+11)
4560 GOSUB 4600
4563 IF Z=0 THEN X=0
4565 PRINT TAB(4)Z;
4566 PRINT TAB(24) USING G$;X;
4567 PRINT TAB(46) USING E$;V
4570 IF Z=>A4 THEN 4590
4575 NEXT Z:A7=A7+12
4580 INPUT"CONTINUE (Y/N) ";C$:IF C$<>"Y" THEN 4000+A(20)*100
4585 CLS:GOSUB 4500:GOTO 4555
4590 GOSUB 9500:GOTO 4000
4600 W=A(20):ON W GOTO 4670,4680,4690
4670 X=A3/A4:V=U:U=A1-X:A1=U:RETURN
4680 IF V<>0 THEN X=(A4+1-Z)/E*A3:U=A1-X:A1=U:V=U:RETURN
4685 V=U:RETURN
4690 IF V<>0 THEN X=U*A3:U=A1-X:A1=U:V=U:RETURN
4695 V=U:RETURN
4900 PRINT"PURCHASE PRICE";TAB(30)"$";:INPUT A1
4910 PRINT"RESALE PRICE";TAB(30)"$";:INPUT A2
4920 A3=A1-A2
4930 PRINT"TERM OF DEPRECIATION (YRS)"TAB(30);:INPUT A4:RETURN
4950 PRINT"PURCHASE PRICE"TAB(30)"$";:INPUT A1
4960 PRINT"DECLINING BALANCE FACTOR"TAB(30)"%";:INPUT A3
4970 PRINT"TERM OF DEPRECIATION (YRS)"TAB(30);:INPUT A4
4980 RETURN
5000 PRINT:INPUT"ANNUAL INTEREST RATE : %";A2
5010 PRINT:INPUT"TERM (YRS,MONTHS) : ";A3,A4:PD=A3:A3=A3*12+A4
5015 RETURN
5100 PRINT STRING$(50,"=")
5105 PRINT H1$;TAB(35) USING E$;A1
5110 PRINT H2$;TAB(35) USING E$;W
5115 PRINT H3$;TAB(35) USING E$;Q
5120 RETURN
9500 FOR Z=1 TO 6000:NEXT:RETURN
